package com.metadata_system.common.db.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@Table(name = "md_auth_reflush_token")
public class AuthReflushToken {
    @Id
    private Integer id;


    /**
     * 原tokenID
     */
    @Column(name = "token_id")
    private String tokenId;

    /**
     * 刷新tokenID
     */
    @Column(name = "reflush_token_id")
    private String reflushTokenId;

    /**
     * 状态: 0.无效 1.有效
     */
    private Boolean status;

    /**
     * 有效期
     */
    @Column(name = "expired_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expiredTime;

    /**
     * 创建时间
     */
    @Column(name = "created_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;
}
